package com.bh.backGoods.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.bh.common.annotation.Dict;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 内部返货对象 jc_back_goods
 *
 * @author slx
 * @date 2024-04-03
 */
@TableName("jc_back_goods")
@ApiModel(value = "内部返货对象", description = "内部返货对象")
@EqualsAndHashCode(callSuper = true)
@Data
public class JcBackGoods extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** ID */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String code;

    /** 起运站 */
    @ApiModelProperty("起运站")
    @Excel(name = "起运站")
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id", dictAlias = "startOrgName")
    private Long startOrgId;
    @TableField(exist = false)
    private String startOrgName;

    /** 目的站 */
    @ApiModelProperty("目的站")
    @Excel(name = "目的站")
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id", dictAlias = "endOrgName")
    private Long endOrgId;
    @TableField(exist = false)
    private String endOrgName;

    @TableField(exist = false)
    private String orgIds;

    /** 车牌 */
    @ApiModelProperty("车牌")
    @Excel(name = "车牌")
    private String license;

    /** 返货理由 */
    @ApiModelProperty("返货理由")
    @Excel(name = "返货理由")
    private String reason;

    /** 数量 */
    @ApiModelProperty("数量")
    @Excel(name = "数量")
    private String totalQuantity;

    /** 体积 */
    @ApiModelProperty("体积")
    @Excel(name = "体积")
    private BigDecimal totalVolume;

    /** 重量 */
    @ApiModelProperty("重量")
    @Excel(name = "重量")
    private BigDecimal totalWeight;

    /** 状态 */
    @ApiModelProperty("状态")
    @Excel(name = "状态")
    private String status;

    /** 发货时间 */
    @ApiModelProperty("发货时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sendDate;

    /** 发货照片 */
    @ApiModelProperty("发货照片")
    @Excel(name = "发货照片")
    private String sendImgs;

    /** 到达时间 */
    @ApiModelProperty("到达时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "到达时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveDate;

    /** 到达照片 */
    @ApiModelProperty("到达照片")
    @Excel(name = "到达照片")
    private String receiveImgs;

    /** 创建人 */
    @ApiModelProperty("创建人")
    @Excel(name = "创建人")
    private String createName;

    /** 修改人 */
    @ApiModelProperty("修改人")
    @Excel(name = "修改人")
    private String modifyName;

    /** 修改时间 */
    @ApiModelProperty("修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modifyTime;

    /** 备注 */
    @ApiModelProperty("备注")
    @Excel(name = "备注")
    private String description;

    /** 返货详情信息 */
    @TableField(exist = false)
    private List<JcBackGoodsItem> jcBackGoodsItemList;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("startOrgId", getStartOrgId())
                .append("endOrgId", getEndOrgId())
                .append("license", getLicense())
                .append("reason", getReason())
                .append("totalQuantity", getTotalQuantity())
                .append("totalVolume", getTotalVolume())
                .append("totalWeight", getTotalWeight())
                .append("status", getStatus())
                .append("sendDate", getSendDate())
                .append("sendImgs", getSendImgs())
                .append("receiveDate", getReceiveDate())
                .append("receiveImgs", getReceiveImgs())
                .append("createName", getCreateName())
                .append("createTime", getCreateTime())
                .append("modifyName", getModifyName())
                .append("modifyTime", getModifyTime())
                .append("description", getDescription())
                .append("jcBackGoodsItemList", getJcBackGoodsItemList())
                .toString();
    }
}